package kr.co.mcshop.basket;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class basketService {
        @Autowired
        private SqlSession sqlsession;
        
        public List getAllBasket(Map map){
                basketMapper mapper = sqlsession.getMapper(basketMapper.class);
                return mapper.getAllBasket(map);
        }
        
        public int insertBasket(Map map){
                basketMapper mapper = sqlsession.getMapper(basketMapper.class);
                return mapper.insertBasket(map);
        }
        
        public int updateBasket(Map map){
                basketMapper mapper = sqlsession.getMapper(basketMapper.class);
                return mapper.updateBasket(map);
        }
        
        public int deleteBasket(Map map){
                basketMapper mapper = sqlsession.getMapper(basketMapper.class);
                return mapper.deleteBasket(map);
        }
}